package com.zxd.threads.thread_safe;

/**
 * ClassName:RunnableTask
 * Package:com.zxd.threads.thread_safe
 *
 * @Date:2023/9/26 14:29
 * @Author:zxde
 */
public class RunnableTask implements Runnable {
    private final Account account;

    public RunnableTask(Account account) {
        this.account = account;
    }



    @Override
    public void run() {
        try {
            //account.drawMoney(1000);
           // account.drawMoneyMethod(1000);
            account.drawMoneyLock(1000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
